﻿namespace DesignPatterns.SingletonPattrens
{
    /// <summary>
    /// 饿汉单例模式，无论是否调用，都会占用系统资源，线程安全
    /// </summary>
    public class HungrySingleton
    {
        private static HungrySingleton instance = new HungrySingleton();
        private HungrySingleton()
        {
        }
        public static HungrySingleton getInstance()
        {
            return instance;
        }
    }
}
